Eclipse Platform
Pre-release 3.0

org.eclipse.text.edits
Class TextEditVisitor

java.lang.Object
  extended byorg.eclipse.text.edits.TextEditVisitor

public class TextEditVisitor
extends Object

A visitor for text edits.

For each different concrete text edit type T there is a method:

In addition, there are methods for visiting text edits in the abstract, regardless of node type:

For edits with chldren, the child nodes are visited in increasing order.

Since:
3.0
See Also:
TextEdit.accept(org.eclipse.text.edits.TextEditVisitor)

Constructor Summary
TextEditVisitor()
           
 
Method Summary
 void postVisit(TextEdit edit)
          Visits the given text edit following the type-specific visit (after endVisit).
 void preVisit(TextEdit edit)
          Visits the given text edit prior to the type-specific visit.
 boolean visit(CopyingRangeMarker edit)
          Visists a CopyingRangeMarker instance.
 boolean visit(CopySourceEdit edit)
          Visists a CopySourceEdit instance.
 boolean visit(CopyTargetEdit edit)
          Visists a CopyTargetEdit instance.
 boolean visit(DeleteEdit edit)
          Visists a DeleteEdit instance.
 boolean visit(InsertEdit edit)
          Visists a InsertEdit instance.
 boolean visit(MoveSourceEdit edit)
          Visists a MoveSourceEdit instance.
 boolean visit(MoveTargetEdit edit)
          Visists a MoveTargetEdit instance.
 boolean visit(MultiTextEdit edit)
          Visists a MultiTextEdit instance.
 boolean visit(RangeMarker edit)
          Visists a RangeMarker instance.
 boolean visit(ReplaceEdit edit)
          Visists a ReplaceEdit instance.
 boolean visit(UndoEdit edit)
          Visists a UndoEdit instance.
 boolean visitNode(TextEdit edit)
          Visits the given text edit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextEditVisitor

public TextEditVisitor()
Method Detail

preVisit

public void preVisit(TextEdit edit)
Visits the given text edit prior to the type-specific visit. (before visit).

The default implementation does nothing. Subclasses may reimplement.


postVisit

public void postVisit(TextEdit edit)
Visits the given text edit following the type-specific visit (after endVisit).

The default implementation does nothing. Subclasses may reimplement.


visitNode

public boolean visitNode(TextEdit edit)
Visits the given text edit. This method is called by default from type-specific visits. It is not called by a edit's accept method. The default implementation returns true.

Returns:
If true is returned, the given node's child nodes will be visited next; however, if false is returned, the given node's child nodes will not be visited.

visit

public boolean visit(CopySourceEdit edit)
Visists a CopySourceEdit instance.

Returns:
If true is returned, the given node's child nodes will be visited next; however, if false is returned, the given node's child nodes will not be visited.

visit

public boolean visit(CopyTargetEdit edit)
Visists a CopyTargetEdit instance.

Returns:
If true is returned, the given node's child nodes will be visited next; however, if false is returned, the given node's child nodes will not be visited.

visit

public boolean visit(MoveSourceEdit edit)
Visists a MoveSourceEdit instance.

Returns:
If true is returned, the given node's child nodes will be visited next; however, if false is returned, the given node's child nodes will not be visited.

visit

public boolean visit(MoveTargetEdit edit)
Visists a MoveTargetEdit instance.

Returns:
If true is returned, the given node's child nodes will be visited next; however, if false is returned, the given node's child nodes will not be visited.

visit

public boolean visit(RangeMarker edit)
Visists a RangeMarker instance.

Returns:
If true is returned, the given node's child nodes will be visited next; however, if false is returned, the given node's child nodes will not be visited.

visit

public boolean visit(CopyingRangeMarker edit)
Visists a CopyingRangeMarker instance.

Returns:
If true is returned, the given node's child nodes will be visited next; however, if false is returned, the given node's child nodes will not be visited.

visit

public boolean visit(DeleteEdit edit)
Visists a DeleteEdit instance.

Returns:
If true is returned, the given node's child nodes will be visited next; however, if false is returned, the given node's child nodes will not be visited.

visit

public boolean visit(InsertEdit edit)
Visists a InsertEdit instance.

Returns:
If true is returned, the given node's child nodes will be visited next; however, if false is returned, the given node's child nodes will not be visited.

visit

public boolean visit(ReplaceEdit edit)
Visists a ReplaceEdit instance.

Returns:
If true is returned, the given node's child nodes will be visited next; however, if false is returned, the given node's child nodes will not be visited.

visit

public boolean visit(UndoEdit edit)
Visists a UndoEdit instance.

Returns:
If true is returned, the given node's child nodes will be visited next; however, if false is returned, the given node's child nodes will not be visited.

visit

public boolean visit(MultiTextEdit edit)
Visists a MultiTextEdit instance.

Returns:
If true is returned, the given node's child nodes will be visited next; however, if false is returned, the given node's child nodes will not be visited.

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.